package com.sailing.lianxi.design.factory;

/**
 * 测试工厂模式
 * @author Administrator
 *
 */
public class Test {

	public static void main(String[] args) {
		ShapeFactory factory = new ShapeFactory();
		//圆对象
		Shape circle = factory.getShape("CIRCLE");
	    circle.draw();
	    Shape rectangle = factory.getShape("RECTANGLE");
	    rectangle.draw();
	    Shape square = factory.getShape("SQUARE");
	    square.draw();
	    
	}
}
